import request from "@/utils/request";

/** 查询积分消费记录信息列表 */
export function listPurchaseHistory(data = {}, params = {}) {
  return request({
    url: "/lgb/purchaseHistory/list",
    method: "GET",
    data,
    params,
  });
}

/** 查询积分列表 */
export function listIntegral(data = {}, params = {}) {
  return request({
    url: "/lgb/integral/list",
    method: "GET",
    data,
    params,
  });
}

/** 新增积分信息 */
export function addIntegral(data = {}, params = {}) {
  return request({
    url: "/lgb/integral",
    method: "POST",
    data,
    params,
  });
}

/** 更新积分信息 */
export function updataIntegral(data = {}, params = {}) {
  return request({
    url: "/lgb/integral",
    method: "PUT",
    data,
    params,
  });
}

/** 删除积分信息 */
export function deleteIntegral(ids) {
  return request({
    url: `/lgb/integral/${ids}`,
    method: "DELETE",
  });
}

/** 获取积分信息详情 */
export function findIntegral(id) {
  return request({
    url: `/lgb/integral/${id}`,
    method: "GET",
  });
}

/** 导出积分信息 */
export function exportIntegral(data = {}, params = {}) {
  return request({
    url: `/lgb/integral/export`,
    method: "GET",
    data,
    params,
  });
}

/** 查询老干部列表 */
export function listInformation(data = {}, params = {}) {
  return request({
    url: "/lgb/information/list",
    method: "GET",
    data,
    params,
  });
}

/** 新增老干部信息 */
export function addInformation(data = {}, params = {}) {
  return request({
    url: "/lgb/information",
    method: "POST",
    data,
    params,
  });
}

/** 更新老干部信息 */
export function updataInformation(data = {}, params = {}) {
  return request({
    url: "/lgb/information",
    method: "PUT",
    data,
    params,
  });
}

/** 删除老干部信息 */
export function deleteInformation(ids) {
  return request({
    url: `/lgb/information/${ids}`,
    method: "DELETE",
  });
}

/** 获取老干部信息详情 */
export function findInformation(id) {
  return request({
    url: `/lgb/information/${id}`,
    method: "GET",
  });
}

/** 导出老干部信息 */
export function exportInformation(data = {}, params = {}) {
  return request({
    url: `/lgb/information/export`,
    method: "GET",
    data,
    params,
  });
}

/** 分页查询查询上传数据信息 */
export function integralPointPage(data = {}, params = {}) {
  return request({
    url: `/lgb/integral/point/page`,
    method: "GET",
    data,
    params,
  });
}

/** 批量充值刷新 */
export function confirmUploadData(data = {}, params = {}) {
  return request({
    url: `lgb/integral/confirm/uploadData`,
    method: "POST",
    data,
    params,
  });
}

/** 导入 */
export function lgbLeaderInfoPage(data = {}, params = {}) {
  return request({
    url: `/lgb/information/lgbLeaderInfo/page`,
    method: "GET",
    data,
    params,
  });
}

/** 确认导入积分 */
export function informationConfirmUploadData(data = {}, params = {}) {
  return request({
    url: `/lgb/information/confirm/uploadData`,
    method: "POST",
    data,
    params,
  });
}

/** 后台查询老干部积分消费记录 */
export function listPurchaseHistoryManage(data = {}, params = {}) {
  return request({
    url: `/lgb/purchaseHistory/manage/list`,
    method: "POST",
    data,
    params,
  });
}

/** 后台根据日期统计消费记录 */
export function purchaseHistoryMangeTotalCount(data = {}, params = {}) {
  return request({
    url: `/lgb/purchaseHistory/manage/totalCount`,
    method: "POST",
    data,
    params,
  });
}

/** 批量更新老干部账户状态 */
export function batchUpdateState(data = {}, params = {}) {
  return request({
    url: `/lgb/information/batch/updateState`,
    method: "POST",
    data,
    params,
  });
}
